
/**
 * 生成随机字符串函数
 */
const dynamicUuid = (name) => {
  const s = []
  const hexDigits = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM"
  for (let i = 0; i < 3; i++) {
    s[i] = hexDigits.substr(Math.floor(Math.random() * 52), 1)
  }
  const uuid = s.join("")
  return `${name}_${uuid}`
}

/**
 * 转换名称组件名称
 * x-col 转转成XCol
 * x-col-column 转成XColColumn
 */
const getComponentName = (name) => {
  const arr = name.split('-');
  let newName = '';
  arr.forEach((v, i) => {
    newName += v.charAt(0).toUpperCase() + v.substring(1);
  })
  return newName
}